package cn.king.springframework.bean.test;

import java.util.HashMap;
import java.util.Map;

public class UserDao {
    private static Map<String,String> hashMap = new HashMap<>();

    public void initDataMethod(){
        System.out.println("执行:init-method");
        hashMap.put("10001","zhangsan");
        hashMap.put("10002","lisi");
        hashMap.put("10003","wangwu");
    }

    public void destroyDataMethod(){
        System.out.println("执行:destroy-method");
        hashMap.clear();
    }
    public String queryUserName(String uid){
        return hashMap.get(uid);
    }
}
